home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / allswags.zip / HARDWARE.SWG < prev    next >
Text File  |  1993-05-28  |  23KB  |  1 lines

  1. SWAGOLX.EXE (c) 1993 GDSOFT  ALL RIGHTS RESERVED 00010         HARDWARE DETECTION                                                1      05-28-9313:48ALL                      SWAG SUPPORT TEAM        2MONITOR.PAS             IMPORT              9           {π> Hi I am looking For some help on use 2 monitors at the same time... 1π> is mono and the other is vga.  I would like to just post a certainπ> screen on the mono and leave the vga like normal..ππVGA Text mode memory begins at $b800, VGA Graphics memory at $A000, andπMDA/Herc memory begins at $b000.  If you plan on running Text and Text,πtry something like this:π}πTypeπ  WhichMonitor = (MDA, VGA);ππProcedure ChangeCel (Row, Column, Foreground, Background, Character : Byte;π                     Which : WhichMonitor);πVarπ  Point : Word;πbeginπ  If Which = MDA thenπ    Point := $b000π  elseπ    Point := $b800;π  MemW[Point : (Row - 1) * 160 + Col * 2] :=π               (Foreground + Background * 16) * 256 + Character;π  end;π{πOf course, there are more optimized ways to do this, but this shouldπportray the basic concept.  Herc Graphics and VGA Graphics would beπdone in much the same manner, but I don't have an Herc With my VGA toπcheck it.π}                                                                      2      05-28-9313:48ALL                      SWAG SUPPORT TEAM        ALOCSIZE.PAS             IMPORT              21          *--*  03-31-93  -  21:47:03  *--*π/. Date: 03-30-93 (23:45)              Number: 24023 of 24035π  To: PEDRO PACHECO                 Refer#: 23957πFrom: ERIC LU                         Read: NOπSubj: allocation Units              Status: PUBLIC MESSAGEπConf: R-TP (552)                 Read Type: GENERAL (A) (+)ππPP>> Is there any way to find (in Pascal) what's de size of each allocation uniπPP>> in a Hard drive?ππPedro,π     See if the following is what you wanted...ππ-------------------------------- Cut  ----------------------------------ππProgram Int21_36;πUses Crt,Dos;πProcedure DiskfreeSpace( DriveCode: Byte);πVarπ   Regs: Registers;π   SectorsPerCluster,π   AvailableClusters,π   BytesPerSector,π   ClustersPerDrive,π(63 min left), (H)elp, More?    AllocationSize,π   Capacity,π   Free:  LongInt;πbeginπ   Regs.AH := $36;π   Regs.DL := DriveCode;π   MSDos(Regs);ππ   {************* Obtaining Infos ******************}π   SectorsPerCLuster:= Regs.AX;π   AvailableClusters:= Regs.BX;π   BytesPerSEctor   := Regs.CX;π   ClustersPerDrive := Regs.DX;ππ   {************* Calculations ********************)π   AllocationSize   := BytesPerSector * SectorsPerCluster;π   Capacity := SectorsPerCluster * BytesPerSector * ClustersPerDrive;π   Free     := SectorsPerCLuster * AvailableClusters * BytesPerSector;ππ   {************* Display *************************}π   Writeln(' Sectors Per Cluster   = ',SectorsPerCluster:15,'');π   Writeln(' Available Clusters    = ',AvailableClusters:15,'');π   Writeln(' Bytes Per Sector      = ',BytesPerSector:15,'');π(63 min left), (H)elp, More?    Writeln(' Clusters Per Drive    = ',ClustersPerDrive:15,'');π   Writeln(' Allocation Size       = ',AllocationSize:15,' Bytes');π   Writeln(' Drive Capacity        = ',Capacity:15,' Bytes');π   Writeln(' Free Space            = ',Free:15,' Bytes');πend;ππbeginπ   ClrScr;π   DiskFreeSpace(0);   {Get Current Drive Info}π   readln;πend.πππ----------------------------- Cut ----------------------------------ππ The above should be ready to run as I have tested on my computer..π It's got more infos..  I was learning it as I was typing it in so Iπ made it more than what you need.π hope this is what you wanted to know...ππ                                                        Ericππ---π(63 min left), (H)elp, More?  ■ OLX 2.1 TD ■ It's only a hobby ... only a hobby ... only aπ * Casino Bulletin Board * Hammonton/Atlantic City NJ U.S.A. 1-609-561-3377π * PostLink(tm) v1.05  CASINO (#18) : RelayNet(tm)ππ(63 min left), (H)elp, end of Message Command?                3      05-28-9313:48ALL                      SWAG SUPPORT TEAM        CLUSTSIZ.PAS             IMPORT              5           {π> Is there any way to find the size of each allocation Unit in a Hard drive?π}ππUses Dos;ππFunction clustsize (drive : Byte) : Word;πVarπ  regs : Registers;πbeginπ  regs.cx := 0;         {set For error-checking just to be sure}π  regs.ax := $3600;     {get free space}π  regs.dx := drive;     {0=current, 1=a:, 2=b:, etc.}π  msDos (regs);π  clustsize := regs.ax * regs.cx;      {cluster size!}πend;ππbeginπ  Writeln(ClustSize(0));πend.                                                                           4      05-28-9313:48ALL                      SWAG SUPPORT TEAM        CPU-ID.PAS               IMPORT              12          {π> How do i get info about witch CPU it is in the current computer??π}ππ{$F+}ππConstπ  CPU_Type : Array[1..4] of String[5] = ('8086', '80286', '80386', '80486');π  Cpu8086  = 1;π  Cpu80286 = 2;π  Cpu80386 = 3;π  Cpu80486 = 4;πVarπ  Result : Byte;πππFunction GetCPU_Type: Byte; Assembler;ππAsmπ  MOV   DX,Cpu8086π  PUSH  SPπ  POP   AXπ  CMP   SP,AXπ  JNE   @OUTπ  MOV   DX, Cpu80286π  PUSHFπ  POP   AXπ  or   AX,4000hπ  PUSH  AXπ  POPFπ  PUSHFπ  POP   AXπ  TEST  AX,4000hπ  JE   @OUTπ  MOV DX, Cpu80386π  {"DB 66h" indicates '386 extended instruction}π  DB 66h; MOV   BX, SP      {MOV EBX, ESP}π  DB 66h, 83h, 0E4h, 0FCh   {AND ESP, FFFC}π  DB 66h; PUSHF             {PUSHFD}π  DB 66h; POP AX            {POP EAX}π  DB 66h; MOV   CX, AX      {MOV ECX, EAX}π  DB 66h, 35h, 00hπ  DB 00h, 04h, 00           {XOR EAX, 00040000}π  DB 66h; PUSH   AX     {PUSH EAX}π  DB 66h; POPF              {POPFD}π  DB 66h; PUSHF             {PUSHFD}π  DB 66h; POP   AX     {POP EAX}π  DB 66h, 25h, 00hπ  DB 00h, 04h, 00h          {AND EAX, 00040000}π  DB 66h, 81h, 0E1h, 00hπ  DB 00h, 04h, 00h          {AND ECX, 00040000}π  DB 66h; CMP   AX, CX      {CMP EAX, ECX}π  JE @Not486π  MOV DX, Cpu80486π@Not486:π  DB 66h; PUSH   CX         {PUSH EXC}π  DB 66h; POPF              {POPFD}π  DB 66h; MOV   SP, BX      {MOV ESP, EBX}π@Out:π  MOV AX, DXπend;ππbeginπ  Result := GetCPU_Type;π  Writeln(Result);πend.π                     5      05-28-9313:48ALL                      SWAG SUPPORT TEAM        CPUSPEED.PAS             IMPORT              13          {π·    Subject: How to determine mhz using TP6.0...ππIt seems to work pretty well, but on a 486/33DX it gave inacurate results...π}ππProgram CpuSpeed;πUsesπ  Crt;πVarπ  Speed, DelayCalibrate : Word;πConstπ  Offset = 9; { For TP 4.0, it should be 16 }πππProcedure WaitForFloppy;πVarπ  tickTil     : LongInt;π  TimerTicks  : LongInt Absolute $40 : $6C;π  motorStatus : Byte Absolute $40 : $3F;πbeginπ  if MotorStatus and $F > 0 thenπ  beginπ    WriteLn('Loading...');π    TickTil := TimerTicks + 91;π    {There are $17FE80 ticks in a day}π    if TickTil > $17FE80 thenπ      Dec(TickTil, $17FE80);π    Repeat Until (MotorStatus and $F = 0) or (TimerTicks >= TickTil);π  end;πend;ππbeginπ  WaitForFloppy;π  DelayCalibrate := MemW[Seg(CheckSnow): Ofs(CheckSnow)+Offset];π  WriteLn('Delay calibration value is ', DelayCalibrate);π  Speed := ((LongInt(1000) * DelayCalibrate) + 110970) div 438;π  Write('Calculated speed: ', Speed div 100,'.');π  WriteLn((speed div 10) MOD 10, speed MOD 10);π  Write('CPU speed is probably ');π  Case Speed OFπ    0..499     : WriteLn('4.77MHz or below');π    500..699   : WriteLn('6MHz');π    700..899   : WriteLn('8MHz');π    900..1099  : WriteLn('10MHz');π    1100..1399 : WriteLn('12MHz');π    1400..1799 : WriteLn('16MHz');π    1800..2199 : WriteLn('20MHz');π    2200..2699 : WriteLn('25MHz');π    2700..3599 : WriteLn('30MHz');π    ELSEπ      WriteLn('30MHz or MORE!');π  end;πend.π                                                                                                                       6      05-28-9313:48ALL                      SWAG SUPPORT TEAM        FLOPSIZE.PAS             IMPORT              10          {π>Does anybody know how to determine the size of a disk drive.  I meanπ>whether it is a 360 K drive or 720 K, 1.4 M or 1.2 M drive.  I'mπ>working on a Program which has the ability to Format diskettes andπ>I want it to be able to come up With the size of a disk drive as aπ>default.  I have looked at the equipment flag in the BIOS and theπ>only thing I can get out of that is the Type of a disk drive not theπ>size.π}πFunction VarCMOS(i : Byte) : Byte ;πbeginπ     port[$70]:=i;π     VarCMOS:=port[$71]πend;ππVar  b    : Byte ;ππbeginπ     b:=VarCMOS($10);π     if b and $f0<>0 thenπ     beginπ          Write('Drive A: = ');π          Case (b and $f0) shr 4 ofπ               1 : Write('5" 360 Ko');π               2 : Write('5" 1,2 Mo');π               3 : Write('3" 720 Ko');π               4 : Write('3" 1,44 Mo')π          end;π     end;π     if b and $f<>0 thenπ     beginπ          Write(', B: = ');π          Case b and $f ofπ               1 : Writeln('5" 360 Ko');π               2 : Writeln('5" 1,2 Mo');π               3 : Writeln('3" 720 Ko');π               4 : Writeln('3" 1,44 Mo')π          end;π     end else WriteLn ;πend.π        7      05-28-9313:48ALL                      SWAG SUPPORT TEAM        LPT-ADDR.PAS             IMPORT              5           {πOr better yet, the BIOS stores the addresses of the parallel Interfacesπon the system at memory location $0040:$0008.  There are four Wordsπhere, allowing up to 4 parallel devices.π-Brian Papeπ}πVarπ  i : Byte;π  par : Array[1..4] of Word;πbeginπ  For i := 1 to 4 doπ  beginπ    par[i] := Word(ptr($0040, $0008 + (i - 1) * 2)^);π    If Par[i] = 0 thenπ      Writeln('Not Found')π    elseπ      Writeln(Par[i]);π  end;πend.πππ                                                                                     8      05-28-9313:48ALL                      SWAG SUPPORT TEAM        SCSICODE.PAS             IMPORT              30          {π > I am trying to issue an SCSI START/StoP Unit via Adaptec's ASPI SCSIπ > manager and an 1542B host adaptor.  This is For an application I amπ > writing in BP.  Adaptec is of no help.  if anyone here has anyπ > commentsπ > or suggestions please respond in this Forum.π}ππUnit Aspi;ππ{ I/O Error reporting:ππ  AspiSenseKey is the primary source of error inFormation.ππ    0:    I/O Complete.π          Warnings (Filemark, Short block, etc) may be posted in Sense.ππ    1-E:  Error occured.π          Examine SRBStat, HostStat, TargStat, Sense For details.ππ    F:    Severe error detected, no SCSI info available.ππ  -------------------------------------------------------------------- }ππInterfaceππConstπ  SrbIn = $08;π  SRBOut = $10;π  SRBNone = $18;π  AspiPtr:  Pointer = Nil;πππTypeπ  AspiSrb = Recordπ    SrbCmd:      Byte;π    SrbStat:     Byte;π    SrbHost:     Byte;π    SrbReqFlags: Byte;π    SrbHdrFill:  LongInt;π    Case Integer ofπ     2: (Srb2TargetID: Byte;π         Srb2LUN:      Byte;π         Srb2DataLen:  LongInt;π         Srb2SenseLen: Byte;π         Srb2DataPtr:  Pointer;π         Srb2LinkPtr:  Pointer;π         Srb2CDBLen:   Byte;π         Srb2HAStat:   Byte;π         Srb2TargStat: Byte;π         Srb2PostAddr: Pointer;π         Srb2Filler:   Array [1..34] of Byte;π         { Sense data follows CDB }π         Srb2CDB:      Array [0..50] of Byte);π     1: (Srb1TargetID: Byte;π         Srb1LUN:      Byte;π         Srb1DevType:  Byte);π     0: (Srb0Cnt:      Byte;π         Srb0TargetID: Byte;π         Srb0MgrID:    Array [1..16] of Char;π         Srb0HostID:   Array [1..16] of Char;π         Srb0HostParm: Array [1..16] of Char);π    end;ππVarπ  AspiSRBStat:      Byte;π  AspiHostStat:     Byte;π  AspiTargStat:     Byte;π  AspiSenseKey:     Byte;π  AspiSense:        Array [0..17] of Byte;π  AspiSenseCode:    Word;ππFunction AspiOpen: Integer;ππProcedure AspiCall (Var SRB: AspiSrb);π{ Call ASPI Handler With SRB }πInline ($FF/$1E/>AspiPtr/π        $58/$58);ππProcedure AspiWait (Var SRB: AspiSrb);ππFunction AspiClose: Integer;ππImplementationππUses Dos;ππProcedure AspiWait (Var SRB: AspiSRB);π{ Call ASPI Handler With SRB and wait For Completion }πbeginπ  if AspiPtr = Nilπ    then beginπ      AspiSenseKey := $0F;π      Exit;π      end;π  With Srb do beginπ    SrbStat := 0;π    AspiCall (Srb);π    While SrbStat = 0 do ;π    AspiSrbStat   := SrbStat;π    AspiHostStat  := Srb2HAStat;π    AspiTargStat  := Srb2TargStat;π    AspiSenseKey  := 0;π    FillChar (AspiSense, Sizeof (AspiSense), #0);π    Move (Srb2CDB [Srb2CDBLen], AspiSense, Sizeof (AspiSense));π    AspiSenseKey := AspiSense[2] and $0F;π    AspiSenseCode := (AspiSense [12] SHL 8) or AspiSense [13];π    end;π  end;ππFunction AspiOpen: Integer;πConstπ  AspiName: Array [1..9] of Char = 'SCSIMGR$'#0;πVarπ  R:       Registers;π  AspiHan: Word;πbeginπ  With R do beginπ    { Assume failure }π    AspiOpen := -1;π    AspiPtr := Nil;ππ    { Open ASPI device driver }π    AX := $3D00;π    DS := Seg (AspiName[1]);π    DX := ofs (AspiName[1]);π    MSDos (R);π    if odd (Flags)π      then Exit;π    AspiHan := AX;ππ    { Do IOCtl Read to get Pointer to ASPI handler }π    AX := $4402;π    BX := AspiHan;π    CX := 4;π    DS := Seg (AspiPtr);π    DX := ofs (AspiPtr);π    MSDos (R);π    if Odd (flags)π      then Exit;ππ    { Close device driver }π    AX := $3E00;π    BX := AspiHan;π    MsDos (R);π    if Odd (Flags)π      then Exit;π    end;ππ  { Indicate success  and Exit }π  AspiOpen := 0;π  end { AspiOpen };ππFunction AspiClose: Integer;πbeginπ  AspiClose := 0;πend { AspiClose };ππend.π                                                                                                                           9      05-28-9313:48ALL                      SWAG SUPPORT TEAM        SECTORIO.PAS             IMPORT              65          {... so there I was, sitting in a bar when a known C Programmer  }π{comes up to me and sniggers "still doing it in Pascal eh?"      }π{"Yup" I replied, and tossed the bartender another hundred.      }π{"Yeah well, when you're ready For a Real language, only C has   }π{all the aces."                                                  }π{I'm a Pascal Programmer.  I don't have to take that.  "Such as?"}π{I hoped he'd bite and he did.                                   }π{"Such as disk sector reading and writing For starters."         }π{"Well I hope you're not bluffin', 'cause here's a trick that    }π{I'll bet you ain't covered."                                    }π{I pulled it out With a swish and laid it on the table.  "Even   }π{provides support For >32M volumes, which the C run-time library }π{manual Forgets to tell you it won't do."                        }π{"Huh?  Where?"                                                  }π{"Right here" I said.  "Just where it says...                    }ππProgram AbsReadTest;ππ{This Program demonstrates a C-style absread and absWrite For TP.}π{As is, it reads the boot sector off drive A:, and optionally    }π{Writes it out to the very last sector on drive A: (assumes 1.2Meg}π{This Program IS dangerous, and is released to the public domain.}π{I take no responsibility For use or misuse, deliberate or       }π{accidental, of this Program or any Program which Uses the       }π{techniques described herein.                                    }ππ{Author: Mitch Davis 3:634/384.6 +61-3-890-2062 v1.0 28-Jun-92.  }ππVar bp:Pointer; {Will point to the buffer For the sector data}ππFunction absread (drive:Char; nsects:Word; lsect:Word; buffer:Pointer):Boolean;ππ{Works just like the C runtime one- including being restricted to 32M volumes!}ππ{drive is a Character, nsects is the number of sectors, and lsect is the first}π{sector.  buffer points to the buffer you'd like filled from disk.  Function  }π{returns True if there was an error, or False if all went well.               }ππVar kludgebuff:Array [0..$1f] of Byte; {Read Ralf Brown's interrupt listing}π    kludgePtr:Pointer;                 {Int 25h - ES:[BP+1E] may change    }ππbeginπ  kludgePtr := @kludgebuff;π  absread := True;π  if drive < 'A' then Exit;π  if drive > 'Z' then Exit;π  Asmπ    push  esπ    push  bpπ    push  diπ    les   di, kludgePtrπ    mov   al, drive      { Gets the passed parameter. }π    and   al, 1fh        { Cvt from ASCII to drive num }π    dec   al             { Adjust because A: is drive 0 }π    mov   cx, nsects     { number of sectors to read }π    mov   dx, lsect      { starting at sector.. }π    push  dsπ    lds   bx, buffer      { Get the address of the buffer }π    mov   bp, diπ    push  siπ    int   25h            { Do the drive read. }π    pop   si             { Remove the flags int 25h leaves on stack}π    pop   siπ    pop   dsπ    pop   diπ    pop   bpπ    pop   esπ    jc    @1π    mov   ah, 0          { No errors, so set Function to False }π    @1:π    mov   @result, ahπ  end;πend;ππFunction absWriteπ            (drive:Char; nsects:Word; lsect:Word; buffer:Pointer):Boolean;ππ{Works just like the C one - including being restricted to 32M volumes!}ππ{drive is a Character, nsects is the number of sectors, and lsect is the first}π{sector.  buffer points to the buffer you'd like filled from disk.  Function  }π{returns True if there was an error, or False if all went well.               }ππVar kludgebuff:Array [0..$1f] of Byte;π    kludgePtr:Pointer;ππbeginπ  kludgePtr := @kludgebuff;π  absWrite := True;π  if drive < 'A' then Exit;π  if drive > 'Z' then Exit;π  Asmπ    push  esπ    push  bpπ    push  diπ    les   di, kludgePtrπ    mov   al, drive      { Gets the passed parameter. }π    and   al, 1fh        { Cvt from ASCII to drive num }π    dec   al             { Adjust because A: is drive 0 }π    mov   cx, nsects     { number of sectors to Write }π    mov   dx, lsect      { starting at sector.. }π    push  dsπ    lds   bx, buffer      { Get the address of the buffer }π    mov   bp, diπ    push  siπ    int   26h            { Do the drive Write. }π    pop   si             { Remove the flags int 26h leaves on stack}π    pop   siπ    pop   dsπ    pop   diπ    pop   bpπ    pop   esπ    jc    @1π    mov   ah, 0π    @1:π    mov   @result, ahπ  end;πend;ππFunction absLread (drive:Char; nsects:Word; lsect:LongInt;πbuffer:Pointer):Boolean;ππ{This Function reads sectors on disks which have the >32M style made popular}π{by Compaq Dos 3.31, MS-Dos 4+ and DR-Dos 5+.                               }ππVar packet:Array [0..9] of Byte; {disk request packet - see Ralf Brown's ints}ππbeginπ  absLread := True;π  if drive < 'A' then Exit;π  if drive > 'Z' then Exit;π  Asmπ    mov   ax, Word ptr lsect     {Get the LSB of the start sector}π    mov   Word ptr packet[0], ax {Store it in the packet         }π    mov   ax, Word ptr lsect + 2 {Get the MSB of the start sector}π    mov   Word ptr packet[2], ax {Store this one too.            }π    mov   ax, nsects             {How many sectors to read       }π    mov   Word ptr packet[4], axπ    {Insert the Pointer to the data buffer into the packet}π    push  bp ; push dsπ    lds   dx, buffer      { Get the address of the buffer }π    mov   Word ptr packet[6], dxπ    mov   dx, dsπ    mov   Word ptr packet[8], dxπ    mov   al, drive      { Gets the passed parameter. }π    and   al, 1fh        { Cvt from ASCII to drive num }π    dec   al             { Adjust because A: is drive 0 }π    int   25h            { Do the drive read. }π    pop   si             { Remove the flags int 25h leaves on stack}π    pop   dsπ    pop   bpπ    jc    @1π    mov   ah, 0π    @1:π    mov   @result, ahπ  end;πend;ππFunction absLWrite (drive:Char; nsects:Word; lsect:LongInt;πbuffer:Pointer):Boolean;ππ{This Function Writes sectors on disks which have the >32M style made popular}π{by Compaq Dos 3.31, MS-Dos 4+ and DR-Dos 5+.                                }ππVar packet:Array [0..9] of Byte;ππbeginπ  absLWrite := True;π  if drive < 'A' then Exit;π  if drive > 'Z' then Exit;π  Asmπ    mov   ax, Word ptr lsectπ    mov   Word ptr packet[0], axπ    mov   ax, Word ptr lsect + 2π    mov   Word ptr packet[2], axπ    mov   ax, nsectsπ    mov   Word ptr packet[4], axπ    push  bp ; push dsπ    lds   dx, bufferπ    mov   Word ptr packet[6], dxπ    mov   dx, dsπ    mov   Word ptr packet[8], dxπ    mov   al, drive      { Gets the passed parameter. }π    and   al, 1fh        { Cvt from ASCII to drive num }π    dec   al             { Adjust because A: is drive 0 }π    int   26h            { Do the drive Write. }π    pop   si             { Remove the flags int 26h leaves on stack}π    pop   dsπ    pop   bpπ    jc    @1π    mov   ah, 0π    @1:π    mov   @result, ahπ  end;πend;ππFunction LongNeeded (drive:Char):Boolean;ππ{This Function returns True or False depending on whether the long versions}π{of absread/absWrite needed to be invoked; that is, it's a drive Formatted }π{in the Dos 4+ >32M style.                                                 }π{I strongly suggest you see Ralf Brown's interrupt listing For int21h subfs}π{440d and 53 - they'll tell you all you know to understand the guts of this}π{Function.                                                                 }ππLabel Escape;ππVar drivestats:Array [0..31] of Byte;ππbeginπ  LongNeeded := False;π  if drive < 'A' then Exit;π  if drive > 'Z' then Exit;π  Asmπ    push dsπ    mov  dx, ssπ    mov  ds, dxπ    lea  dx, drivestatsπ    mov  bl, drive      { Gets the passed parameter. }π    and  bl, 1fh        { Cvt from ASCII to drive num }π    mov  ax, 440Dhπ    mov  cx, 0860hπ    int  21hπ    jc   Escapeπ    mov  ax, Word ptr drivestats[0Fh]π    or   ax, axπ    jnz Escapeπ    mov  @Result, 1π  Escape:π    pop  dsπ  end;πend;ππbeginπ  getmem (bp,2048);π  Writeln (LongNeeded ('A'));π  Writeln (LongNeeded ('C'));π  Writeln (absread  ('A',1,0,bp));π(*  Writeln (absWrite ('A',1,2399,bp)); *) {remove the comments at your own}π                                           {risk!!!}π  freemem (bp,2048);πend.ππ{So I bought him a drink.  The poor guy looked like he needed one....}π                                 10     05-28-9313:48ALL                      SWAG SUPPORT TEAM        TURBO.PAS                IMPORT              9           { Does anyone out there know how to set the Software Turbo Speed on Motherπ boards without hitting the Turbo Switch or the <Ctrl> <Alt> <-> key toπ slow the system and or Speed it up again? Thanks...π}ππProgram speed;πUses Dos,Crt;ππProcedure do_speed(mode : String);πVarπ reg : Registers;π oldmem : Byte;ππbeginπ oldmem := mem[$40:$17];π if UpCase(mode[1]) = 'N' thenπ beginπ  reg.al := 74;π  Writeln('Speed set to NorMAL MODE');π end elseπ beginπ  reg.al := 78;π  Writeln('Speed set to TURBO MODE');π end;π mem[$40:$17] := 140;π reg.ah := $4F;π intr($15,reg);π mem[$40:$17] := oldmem;πend;ππbeginπ if paramcount < 1 thenπ beginπ  Writeln(' Speed.exe (c) by Werner Schlagnitweit 2:310/3.0');π  Writeln(' This Program should work on all machines which ');π  Writeln(' use the CTRL-ALT-+ key to toggle the speed     ');π  Writeln;π  Writeln(' Usage : Speed N  For normal NON TURBO mode');π  Writeln('         Speed T  For normal TURBO mode    ');π  halt;π end else do_speed(paramstr(1));πend.π